<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
require('../db_conn.php');

$sql="SELECT * FROM tb_ad ORDER BY id desc limit 0,5";
$ggs=$db->query($sql); 
$bjs=$ggs->fetch_all(MYSQLI_BOTH);

$id=isset($_GET['id'])?$_GET['id']:0;//? 
$sql="SELECT * FROM `tb_ad`  where id=$id ";   //写查询语句  isshow=1   取5个    
$gg2s=$db->query($sql); //执行语句  $rs是一个结果集
$bj1=$gg2s->fetch_array(MYSQLI_BOTH);

require 'editshow_html.php';

$gg2s->free();
$db->close();